import React, {useContext} from 'react';
import {View} from 'react-native';
import {useNavigation} from '@react-navigation/native';
import {useMount} from 'ahooks';
import {Button, Text, ListItem, Avatar} from '@rneui/base';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
import GlobalContext from '@/GlobalContext';

import LogoutButton from './LogoutButton';

const leftIconSize = 18;
const rightIconSize = 20;

export default () => {
  const navigation = useNavigation();
  return (
    <>
      <ListItem
        onPress={() => {
          navigation.push('MineSettingSetPassword');
        }}
        style={{
          marginTop: 1,
        }}>
        <FontAwesome5 name="lock" size={leftIconSize} />
        <ListItem.Content>
          <ListItem.Title>登录密码</ListItem.Title>
        </ListItem.Content>
        <ListItem.Chevron size={rightIconSize} />
      </ListItem>

      <LogoutButton />
    </>
  );
};
